package com.itheima.date;

import java.util.Date;

public class DateDemo2 {
    public static void main(String[] args) {
        method1();

        Date date1 = new Date();
        date1.setTime(0L);
        System.out.println(date1);
    }

    private static void method1() {
        Date date1 = new Date();
        // 获取 当前时间 的毫秒值
        long time = date1.getTime();
        System.out.println(time);

        long time2 = System.currentTimeMillis();
        System.out.println(time2);
    }
}
